Currently the virtual MCE MSR assume all MSRs range from 0 to
MAX_NR_BANKS are always MCE MSR, this is not always correct. With this
patch, the mce_rdmsr/mce_wrmsr will only handle vMCE MSR range from 0
to the MCA banks in the host platform.
Please notice that some MSR beyond current MCA banks in the host
platform are really MCA MSRs, that should be handled by general MSR
handler.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
bank = (msr - MSR_IA32_MC0_CTL) / 4;
if ( bank >= (d->arch.vmca_msrs.mcg_cap & MCG_CAP_COUNT) )
{
- mce_printk(MCE_QUIET, "MCE: bank %u does not exist\n", bank);
- ret = -1;
+ mce_printk(MCE_QUIET, "MCE: MSR %x is not MCA MSR\n", msr);
+ ret = 0;
break;
}
switch (msr & (MSR_IA32_MC0_CTL | 3))
bank = (msr - MSR_IA32_MC0_CTL) / 4;
if ( bank >= (d->arch.vmca_msrs.mcg_cap & MCG_CAP_COUNT) )
{
- mce_printk(MCE_QUIET, "MCE: bank %u does not exist\n", bank);
- ret = -1;
+ mce_printk(MCE_QUIET, "MCE: MSR %x is not MCA MSR\n", msr);
+ ret = 0;
break;
}
switch ( msr & (MSR_IA32_MC0_CTL | 3) )